#include "Collection_Iteration.h";

template<class Iter, class Funct>
void for_all(Iter start, Iter end,
             Funct& functor) {
    for (Iter i = start; i != end; ++i)
        functor.action(*i);
}

template<class Iter, class Funct>
void for_all_pairs(Iter start1, Iter end1,
                   Iter start2, Iter end2,
                   Funct& functor) {
    for (Iter i = start1; i != end1; ++i)
        for (Iter j = start2; j != end2; j++)
            functor.action(*i, *j);
}
